- key
- The object to use as the key of the element to add.
- value
- The object to use as the value of the element to add.
Visual Basic (Declaration) | |
---|---|
Overloads Public Overridable Sub Add( _ ByVal key As TKey, _ ByVal value As TValue _ ) |
Visual Basic (Usage) | Copy Code |
---|---|
Dim instance As ThreadSafeDictionary(Of TKey,TValue) Dim key As TKey Dim value As TValue instance.Add(key, value) |
Parameters
- key
- The object to use as the key of the element to add.
- value
- The object to use as the value of the element to add.
Exception | Description |
---|---|
System.ArgumentNullException | is null. |
System.ArgumentException | An element with the same key already exists in the . |
System.NotSupportedException | The is read-only. |
Target Platforms: Microsoft .NET Framework 2.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7